package com.gok.seasonmovie.service;

import com.gok.seasonmovie.entity.Seat;
import com.gok.seasonmovie.mapper.SeatMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SeatService {

    @Autowired
    private SeatMapper seatMapper;
    public List<Seat> getSeat(String cid, String mid, String starttime){
        return seatMapper.getSeat(cid,mid,starttime);
    }


    public void insertSeats(String cid, String mid, String starttime, List<Integer> seats) {
        for (int seat : seats) {
            seatMapper.insertSeats(cid, mid, starttime, seat);
        }
    }


}
